ci: Cancel in-progress workflow runs on branch push - #232
Merged
Conversation
Add a `concurrency` block to the top-level configuration of the lint
and test workflow. This groups runs by workflow and branch reference
(`${{ github.workflow }}-${{ github.ref }}`) and enables automatic
cancellation of active runs on any push (`cancel-in-progress: true`),
while keeping the `main` branch protected from cancellation.
Assisted-by: Gemini CLI:gemini-3.5-flash
There was a problem hiding this comment.
🟢 Approval recommended
The concurrency configuration is correctly scoped at the workflow level and matches the stated intent to cancel branch runs while keeping main protected.
Pull request overview
This PR adds a workflow-level GitHub Actions concurrency configuration to reduce redundant CI work by canceling prior in-progress runs when new commits are pushed to the same branch, while ensuring main runs are not cancelled.
Changes:
- Added a top-level
concurrencyblock to group runs by workflow + ref (${{ github.workflow }}-${{ github.ref }}). - Enabled
cancel-in-progressfor all refs exceptrefs/heads/main.
File summaries
| File | Description |
|---|---|
| .github/workflows/ci.yml | Adds workflow-level concurrency grouping and conditional cancellation to avoid overlapping CI runs on branch pushes. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
🎉 This PR is included in version 2.26.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a
concurrencyblock to the top-level configuration of the lint and test workflow. This groups runs by workflow and branch reference (${{ github.workflow }}-${{ github.ref }}) and enables automatic cancellation of active runs on any push (cancel-in-progress: true), while keeping themainbranch protected from cancellation.Assisted-by: Gemini CLI:gemini-3.5-flash